<template>
  <div class="write-blog-warp">
      <!-- 测试一下编辑器 -->
      <markDownEditor v-if="tagListIsReady" :tagList="tagListData" ></markDownEditor>
  </div>
</template>

<script>
import markDownEditor from '@/components/writeBlogComponents/markdownEditor';
import {request} from '@/network/request.js';
export default {
    name:"writeBlog",
    data(){
      return {
        tagListData:[],
        tagListIsReady:false
      }
    },
    components:{
      markDownEditor
    },
    methods:{

    },
    created(){
      //获取tagList的数据
      request({
        url:"/tag/tagList/"+this.$store.getters.getCurrentUser.userId+"/0"
      }).then(res=>{
        // console.log(res);
        this.tagListData=res.data.tagList;
        this.tagListIsReady=true;
      }).catch(err=>{
        console.log(err);
      })
    }
}
</script>

<style>
.write-blog-warp {
  min-height: 800px;
}
</style>